﻿@using InnovaApp.Layers.ResourcesLayer.Properties
@model InnovaApp.Portals.MVC4Portal.Models.MetaModels.ApplicationSettings.InnoAppDynamicSetting_MetaModel
@Html.HiddenFor(x => x.Id)
@Html.HiddenFor(x => x.FK_InnoApplication)
<div class="box">
    <ol class="olMainForm">
        <li>
            <label class="spExpectedType">[@Model.ExpectedType]</label> 
            <label class="spName">@Model.Name</label>
            @switch (Model.enExpectedType)
            {
                case InnovaApp.Layers.CommonLayer.enDynamicSettingsExpectedTypes.typeBool:
                @Html.DropDownListFor(m => m.Value, (new bool[] { true, false }).Select(x => new SelectListItem() { Value = x.ToString(), Text = x.ToString(), Selected = x == bool.Parse(Model.Value) }))
                    break;
                default:
                @Html.TextBoxFor(m => m.Value, Model.ValueHtmlAttributes)
                    break;
            }
            @Html.ValidationMessageFor(m => m.Value,String.Empty, new { @class="dynamicFieldValidation"})
        </li>
    </ol>
</div>
